// 第三种方式实现，继承HttpServlet
package cn.ycc1;
import javax.servlet.http.*;
import java.io.*;

public class HelloHttp extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse res) {
		try {
			PrintWriter pw = res.getWriter();
			pw.println("hello http");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	
	public void doPost(HttpServletRequest req, HttpServletResponse res) {
		this.doGet(req, res);
	}
}